﻿XIncludeFile "DrawImage.pb"

;==============================函数类型===============================
Prototype.l Draw(This,wParam,lParam)
Prototype.l Event(This, hWnd, uMsg, wParam, lParam)
Prototype.l Load(This)
Prototype.l IsLocation(This, hWnd, X, Y)
Prototype.l gSize(This,Width,Height)
Prototype.l gText(This,Text.s)
Prototype.l gClick(This,hWnd, uMsg, wParam, lParam)
Prototype.l Free(This)

;==============================常数================================
Enumeration
  #Window=1
  #Button
  #Text
  #Label
  #Date
EndEnumeration

Enumeration
 #EventGadget=1
 #EventMenu
EndEnumeration

Enumeration
  #WM_UpDataWindow =#WM_USER +1
  #WM_LoadWindow
  #WM_Draw
  
  #WM_MouseToEnte
  #WM_MouseToLeave
  #IM_Event_LeftClick

EndEnumeration
;==============================对像事件接口================================

Structure Text
  Text.s
  FontName.s
  FontSize.f
  FontStyle.l
  TextColor.l
  PenColor.l
  PenWidth.f
  Align.l
  Style.l  ;1位图绘制,2矢量绘制,4抗锯齿
  X.l
  Y.l
  Width.l
  Height.l
EndStructure
  
Structure CreatWnd
  ImageBack.L
   _0.l
  UpLeft.l
  Up.l
  UpRight.l
  Right.l
  DownRight.l
  Down.l
  DownLeft.l
  Left.l
  Center.l
  Text.Text
EndStructure

Structure PWnd
  Gadget.l        ;控件表
  UpList.l        ;上一个窗口
  DownList.l      ;下一个窗口
  HostGadget.l    ;宿主控件
  NewGadget.l     ;最新建立的控件
  OnGadget.l      ;选中控件
  UpGadget.l      ;上一次选中的控件
  Image.l         ;当前绘制的图片
  Draw.l          ;绘制缓冲
  ModeSource.l    ;绘制模式
  Creat.CreatWnd  ;创建一个控件
  X.l             ;窗口坐标X
  Y.l             ;窗口坐标Y
  Width.l         ;窗口宽度
  Height.l        ;窗口高度
  Visible.B       ;可见的
  Enabled.B       ;可用的状态
  Type.C          ;窗口类型
  wLoad.Load
  wSize.gSize
  wText.gText
  wClick.gClick
  wIsLoca.IsLocation
  wDraw.Draw
  wEvent.Event
  wFree.Free
EndStructure





; IDE Options = PureBasic 5.11 (Windows - x64)
; CursorPosition = 56
; FirstLine = 28
; EnableAsm
; EnableUnicode
; EnableXP
; DisableDebugger
; HideErrorLog
; CompileSourceDirectory
; EnableExeConstant